gdkpixbuf-drawable: Free the pixbuf on Cairo error
authorAdrien Plazas <kekun.plazas@laposte.net>
Mon, 14 Dec 2020 12:39:42 +0000 (13:39 +0100)
committerAdrien Plazas <kekun.plazas@laposte.net>
Mon, 14 Dec 2020 14:07:41 +0000 (15:07 +0100)
This avoids leaking the pixbuf.

gdk/gdkpixbuf-drawable.c

index 3b7c717bb9686b8e3c7b3a0b772454c9135f166c..b0d113cfaf991667549dc80c3cbc86f586ced127 100644 (file)
@@ -202,6 +202,7 @@ gdk_pixbuf_get_from_surface  (cairo_surface_t *surface,
   if (cairo_surface_status (surface) || dest == NULL)
     {
       cairo_surface_destroy (surface);
+      g_clear_object (&dest);
       return NULL;
     }